package lumis.portal.sendmail;

import lumis.portal.PortalException;
import lumis.portal.authentication.SessionConfig;
import lumis.portal.stability.StableMinor;
import lumis.util.ITransaction;

/**
 * Defines the methods a mail sender must implement.
 * A mail sender is an object called by {@link ISendMailManager}
 * to perform the sending of mails.
 * @since 4.0.4
 * @version $Revision: 13082 $ $Date: 2011-05-27 16:03:12 -0300 (Fri, 27 May 2011) $
 */
@StableMinor(version = "6.0", sinceVersion = "4.0")
public interface IMailSender
{
	/**
	 * Sends a mail.
	 * @param sessionConfig the user session information
	 * @param mail information about the mail to be sent.
	 * @param transaction the transaction for persistence access.
	 * @throws PortalException if it was not possible to send the mail.
	 */
	public void sendMail(SessionConfig sessionConfig, ISingleMail mail, ITransaction transaction) throws PortalException;
}
